﻿using System.Web.Mvc;
using Eacademy.Library.Routes;

namespace Eacademy.Areas.Admin
{
    public class AdminAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Admin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteLowerCase(
                "Admin_lessons",
                "Admin/Lessons/List/{id}",
                new { area = "Admin", action = "Index",controller = "Lessons", id = UrlParameter.Optional },
                new string[] { "Eacademy.Areas.Admin.Controllers" }
            );

            context.MapRouteLowerCase(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { area = "Admin", action = "Index", id = UrlParameter.Optional },
                new string[] { "Eacademy.Areas.Admin.Controllers" }
            );
        }
    }
}
